

package jetbrains.buildServer.server.graphql.model;

import jetbrains.buildServer.server.graphql.util.ObjectIdentificationNode;
import jetbrains.buildServer.serverSide.agentTypes.SAgentType;
import org.jetbrains.annotations.NotNull;

public class AgentType implements ObjectIdentificationNode {
  private final SAgentType mySource;

  public AgentType(@NotNull SAgentType source) {
    mySource = source;
  }

  @NotNull
  public SAgentType getSource() {
    return mySource;
  }

  @NotNull
  public String getName() {
    return mySource.getDetails().getDisplayName();
  }

  public boolean isCloud() {
    return mySource.isCloud();
  }

  @Override
  public String getRawId() {
    return Integer.toString(mySource.getAgentTypeId());
  }
}